package com.amos.think.domain.user;

import org.apache.commons.lang3.StringUtils;

import javax.validation.ValidationException;
import java.io.Serializable;

/**
 * 用户名称
 */
public class UserName implements Serializable {

    public UserName(){}
    private String name;

    public UserName(String name) {
        if (StringUtils.isBlank(name)) {
            throw new ValidationException("用户名不能为空");
        }
        this.name = name;
    }
    public String getName() {
        return name;
    }
}
